<?php

namespace app\common\model;

use think\Model;


class Hospitaltime extends Model
{

    

    

    // 表名
    protected $name = 'hospital_appointment_time';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];
    public $weeksinfoList = ['周一','周二','周三','周四','周五','周六','周日'];

    public function getWeekdaysList()
    {
        return ['1' => __('周一'), '2' => __('周二'),'3'=>'周三','4'=>'周四','5'=>'周五','6'=>'周六','7'=>'周日'];
    }
    







    public function hospital()
    {
        return $this->belongsTo('Hospital', 'hospital_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
